import { createRouter, createWebHistory } from 'vue-router';
import HomeView from '../views/HomeView.vue';

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/plan',
      name: 'plan',
      component: () => import('../views/RoutePlanning/index.vue'),
    },
    {
      path: '/addPlan',
      name: 'addPlan',
      component: () => import('../views/AddPlanning/index.vue'),
    },
    {
      path: '/addPlace',
      name: 'addPlace',
      component: () => import('../views/AddPlace/index.vue'),
    },
    {
      path: '/savePlan',
      name: 'savePlan',
      component: () => import('../views/SavePlan/index.vue'),
    },
    {
      path: '/aiPlan',
      name: 'aiPlan',
      component: () => import('../views/AiPlan/index.vue'),
    },
    {
      path: '/aiPlanRes',
      name: 'aiPlanRes',
      component: () => import('../views/AiPlanRes/index.vue'),
    },
    {
      path: "/plan/RouteOptimize",
      name: "RouteOptimize",
      component: () => import("../views/RoutePlanning/RouteOptimize.vue"),
    },
    {
      path: "/plan/addRoute",
      name: "addRoute",
      component: () => import("../views/RoutePlanning/AddRoute.vue"),
    },
  ],
});

export default router;
